import org.restlet.resource.*;
import org.restlet.data.*;


page = 1;
pageParam = queryParameters.getFirst(
		"page");

if (pageParam != null) {
	String pageText = pageParam.getValue();
	if (pageText != null)
		page = Integer.valueOf(pageText);
}

if(page <= 0 ){
	println "wrong page requested : " + page;
	throw new SimpleException("requested page number size must be bigger or equal to 1");
}